<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml"
      layout:decorate="~{front/common/manage}" xmlns:layout="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="UTF-8">
  <title>作品信息详情</title>
  <link rel="stylesheet" href="/static/front/css/my-prod-all.css">
  <link rel="stylesheet" href="/static/front/css/my-prod-checkright.css">
  <link rel="stylesheet" href="/static/front/css/my-prod-checknopass.css">
</head>
<body>
<div layout:fragment="content" class="con9-r">

</div>
<th:block layout:fragment="script">
  <script type="text/javascript" src="/static/front/js/lib/lightbox-plus-jquery.min.js"></script>
  <script type="text/javascript">

    layui.use(['layer','laytpl'], function () {
      var layer = layui.layer,
          laytpl = layui.laytpl;

      var id = Util.getQueryString('id');
      if(id){
        $.get('/copyright/findSingleWorksVo', {id: id}, function (data) {
          var getTpl = $('#tpl').html(),
              tbody = $(".con9-r");
          laytpl(getTpl).render(data, function (html) {
            tbody.html(html);
          });


          $('.enlarge').click(function () {
            var certImgUrl = $('.certImg').attr('src');
            layer.open({
              type: 1,
              title: false,
              shadeClose: true,
              area: ['720px', '500px'],
              shade: [0.8, '#393D49'],
              closeBtn: 0,
              content: '<div><img src ="' + certImgUrl + '" style="max-width: 100%"/></div>'
            })
          });

        }, 'json')
      }

      var goods_id = Util.getQueryString('goodsId');
      if(goods_id){
        $.get('/copyright/findSingleWorksVoByGoodsId', {goodsId: goods_id}, function (data) {
          var getTpl = $('#tpl').html(),
              tbody = $(".con9-r");
          laytpl(getTpl).render(data, function (html) {
            tbody.html(html);
          });


          $('.enlarge').click(function () {
            var certImgUrl = $('.certImg').attr('src');
            layer.open({
              type: 1,
              title: false,
              shadeClose: true,
              area: ['720px', '500px'],
              shade: [0.8, '#393D49'],
              closeBtn: 0,
              content: '<div><img src ="' + certImgUrl + '" style="max-width: 100%"/></div>'
            })
          });

        }, 'json')
      }




    })
  </script>

  <script type="text/html" id="tpl">
    {{# var fn = function(dna){ if(typeof(dna)==undefined){ return ''} return dna.substring(0,9) };}}
    {{# if(d.worksProcess=='passed'){ }}
    <div class="img-info passed">
      <div class="return">
        <a href="/copyright/manage/works">返回</a>
      </div>
      <ul>
        <li><img class="worksImg" src="{{d.imageUrl}}"/></li>
        <li>
          <img src="{{d.certImgUrl}}" class="certImg"/>
          <a href="http://meisudci.oss-cn-beijing.aliyuncs.com/certificate/{{d.certFileName}}" target="_blank" class="download"></a>
          <a href="javascript:;" class="enlarge"></a>
        </li>
      </ul>
      <dl>
        <dt>{{d.worksFullName}}<img src="/static/front/imgs/zys99.png"></dt>
        <dd> {{ d.dciCode}} </dd>
        <dd>作品唯一DNA：<font>{{ fn(d.dna) }}</font><a href="/copyright/manage/worksdna?dna={{d.dna}}" class="detail" target="_blank">认证详情&gt;&gt;</a></dd>
      </dl>
    </div>
    {{# } else{ }}
    <div class="nopass-info">
      <div class="return">
        <a href="/copyright/manage/works">返回</a>
      </div>
      <div class="img">
        <img src="/static/front/imgs/zys103.png"/>

      </div>
      {{# if(d.worksProcess=='refused'){ }}
      <div class="txt">
        <h4>您的作品未通过审核！</h4>
        <p>{{ d.failReason}}</p>
      </div>
      {{# } }}
      {{# if(d.worksProcess=='commited'){ }}
      <div class="txt">
        <h4>审核中</h4>
        <p>您的作品还在审核中，审核周期为7-10个工作日，请您耐心等待！如有疑问可咨询：400-999-8242</p>
      </div>
      {{# } }}
    </div>

    <div class="img-info2">
      <div class="img">
        <img src="{{d.imageUrl}}"/>
      </div>
      <dl>
        <dt class="worksFullName">{{d.worksFullName}}</dt>
        <!--<dd>作品唯一DNA：<font> {{fn(d.dna)}}  </font><a href="/copyright/manage/worksdna?dna={{d.dna}}" class="detail" target="_blank">认证详情&gt;&gt;</a></dd>-->
        {{# if(d.rocde==null||new String(d.rcode).trim() == '' ){ }}
        {{# if(d.rcodeStatus==null||new String(d.rcodeStatus).trim() == '' ){ }}
        R码生成中，请等待
        {{# } }}
        {{# if(d.rcodeStatus==2){ }}
        R码已作废
        {{# } }}

        {{# } }}
        {{# if(d.rocde!=null&&new String(d.rcode).trim() != '' ){ }}
        <dd><font> {{d.rcode}}  </font><a href="{{d.certificateUrl}}" class="detail" target="_blank">查看详情&gt;&gt;</a></dd>
        {{# } }}
      </dl>
    </div>
    {{# } }}

    <div class="info">
      <div class="info-top">
        <div class="title">
          <h2>创作信息</h2>
        </div>
        <div class="lists">
          <ul>
            <li>
              <label>著作权人：</label>
              <p>{{d.author}}</p>
            </li>
            <li>
              <label>作品性质：</label>
              <p>原创</p>
            </li>
            <li>
              <label>作品类型：</label>
              <p>{{ d.worksTypeName }}</p>
            </li>
            <li>
              <label>作品名称：</label>
              <p> {{ d.worksFullName }}</p>
            </li>
            <li>
              <label>完成日期：</label>
              <p> {{ d.creationDate }}</p>
            </li>
            <li>
              <label>创作地点：</label>
              <p>{{ d.creationCountry}}</p>
              <p>{{d.creationProvince}}</p>
              <p>{{d.creationCity}}</p>
            </li>
            <li>
              <label>是否发表：</label>
              <p>{{d.publishStatusName}}</p>
            </li>
            <li>
              <label>首次发表日期：</label>
              <p>{{d.firstPublishDate}}</p>
            </li>
            <li>
              <label>发表地点：</label>
              <p> {{d.firstPublishCountry}}</p>
              <p>{{d.firstPublishProvince}}</p>
              <p>{{d.firstPublishCity}}</p>
            </li>
            <li class="explain">
              <label>创作说明：</label>
              <p> {{d.mainFeatures}} </p>
            </li>
          </ul>
        </div>
      </div>
      <div class="info-bottom">
        <div class="title">
          <h2>交易信息</h2>
        </div>
        <div class="lists">
          <ul>
            <li>
              <label>内容分类：</label>
              <p>{{d.workCategroyName}}</p>
            </li>
            <li>
              <label>授权信息：</label>
              <p class="">{{d.authorizeRuleDesc}}</p>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </script>
</th:block>
</body>
</html>